import {request} from "@/network/request";

export function addFile(message, file) {
    return request({
        url: "/addFile",
        method: "post",
        params: {
            message
        },
        data: file
    })
}

export function deleteFile(message, fileUrl) {
    return request({
        url: "deleteFile",
        method: "post",
        params: {
            message,
            fileUrl
        }
    })
}

export function getAbout() {
    return request({
        url: "/getAbout",
        method: "get",
    })
}

export function editAbout(content) {
    return request({
        url: "/editAbout",
        method: "post",
        data: encodeURIComponent(content)
    })
}

export function test(testData) {
    return request({
        url: "/myTest",
        method: "post",
        data: testData
    })
}